package com.mack.alioss.controller;

import com.aliyuncs.exceptions.ClientException;
import com.mack.alioss.entity.OssToken;
import com.mack.alioss.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/oss")
public class OssController {
    @Autowired
    private OssService ossService;

    @GetMapping("/getToken")
    public OssToken getToken() {
        return ossService.getToken();
    }
}
